package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Question;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.QuestionQueryObject;

import java.util.List;

public interface QuestionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Question entity);

    Question selectByPrimaryKey(Long questionId);

    List<Question> selectAll();

    int updateByPrimaryKey(Question entity);

    List<Question> selectByUserId(QueryObject qo);
    //选择有回答的问题
    List<Question> selectHasAnswer(QuestionQueryObject qo);
    //选择没回答过的问题
    List<Question> selectNoAnswer(QuestionQueryObject qo);
    //更新为已回答的状态
    void updateIsAnswer(Long id);
    //选择搜索的问题
    List<Question> selectByKeyword(QuestionQueryObject qo);
    //更新总数
    void updateSum(Long id);
}